﻿var myApp = angular.module('loginApp', []);

// create angular controller
myApp.controller('loginController', function ($scope, $location, EventsService2) {

    $scope.validate = function (login) {
        EventsService2.checkLogin(login).then(function () {
            $scope.error = "";
            window.location.assign("/Home");
        }, function ()
        { $scope.error = "Invalid user name and password."; });
    };

});
